﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html>
    <head>
        <meta content="Innovasys Document! X (http://www.innovasys.com)" name=GENERATOR>
        <!--DXMETADATA start type="MetaCharset" --><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><!--DXMETADATA end-->
        <!--DXMETADATA start type="PageItemTitle" format="<title>AddChildItemBinded Method (XtremePropertyGrid)</title>" --><title>AddChildItemBinded Method</title><!--DXMETADATA end-->
        <link href="stylesheets/axstylesheet.css" type=text/css rel=stylesheet>
        <script src="script/ax.js" type=text/javascript>
    </script>

    


<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
    <body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(12772);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../index.htm?page=XtremePropertyGrid~PropertyGridItemBool~AddChildItemBinded.html";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="XtremePropertyGrid~PropertyGridItemOption~AddChildItemBinded.html" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="template2/btn_prev_n.gif" border="0"></a><A href="XtremePropertyGrid~PropertyGridItemDate~AddChildItemBinded.html" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="welcome_screen.htm">Codejock ActiveX Controls v15.3</A> &gt; <A href="XtremePropertyGrid_P.html">Xtreme Property Grid</A> &gt; Methods &gt; </div>
	<div id="winchm_template_title">AddChildItemBinded Method (XtremePropertyGrid)</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div class=popupbubble id=dxseealsomenu><p id=dxseealsocontent><a href="#Bookmark12308">PropertyGridItemBool Object</a>
&nbsp;|&nbsp;<a href="#Bookmark12260">PropertyGridItem Object</a>
&nbsp;|&nbsp;<a href="#Bookmark12264">AddChildItem Method</a>
&nbsp;|&nbsp;<a href="#Bookmark12271">InsertChildItem Method</a>
</p><!--DXMETADATA end --> 
        </div>
        <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_BUBBLES" namespace="parameter" source="Item" -->
<div id="Type_box" class="popupbubble">
<DL><DT class="popupbubble"><I>Type</I></DT>
<DD class="popupbubble"><p>The type of the&nbsp;PropertyGridItem.</p></DD></DL>
</div>
<div id="Handler_box" class="popupbubble">
<DL><DT class="popupbubble"><I>Handler</I></DT>
<DD class="popupbubble"><p>The object that "handles" the variable the item is binding to.&nbsp; I.e. The object the variable is defined in.</p></DD></DL>
</div>
<div id="Property_box" class="popupbubble">
<DL><DT class="popupbubble"><I>Property</I></DT>
<DD class="popupbubble"><p>The name of the variable&nbsp;that will be bound to the PropertyGridItem in string notation (explained below)</p></DD></DL>
</div>
<!--DXMETADATA end --> 
        <div id=pagetop>
            <div id=projectnamebanner>
                <table class=projectnametable cellspacing=0>
                    <tbody>
                        <tr>
                            <!--DXMETADATA start type="Literal" condition="childitems:itemtype=seealso" value="<td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td>" --><td class='button'><a href='' id='seealsobutton' onclick='showSeeAlsoBox()'><img alt='See Also' border='0' src='axImages/seealso.gif' width=14 height=14></a></td><!--DXMETADATA end -->
                            <td>
                                <!--DXMETADATA start type="Phrase" Name="Product_Header" -->Xtreme Property Grid ActiveX Control v15.3<!--DXMETADATA end --> 
                            </td>
                            <td align=right>
                                <!--DXMETADATA start type="Variable" name="FeedbackLink" format="" --><!--DXMETADATA end -->
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div id=pagetitlebanner>
                <h1 class=dxh1>
                <!--DXMETADATA start type="PageItemTitle" -->AddChildItemBinded Method<!--DXMETADATA end --></h1>
            </div>
        </div>
        <div id=pagebody valign="bottom">
            <!--DXMETADATA start type="IsNew" format="<script>document.all.pagebody.className = 'newTopic'</script>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Description" source="Item" format="<h4 class=dxh4>$$Description$$</h4><p>%%description%%</p>" --><h4 class=dxh4>Description</h4><p><p>Adds a child item that is bound to the PropertyGridItem.&nbsp; This means that the PropertyGridItem is bound to a variable, and the value of the item is stored in this variable.</p></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="Syntax" lang="VB" format="<div Class=LanguageSpecific Name=Syntax_VB><h4 class=dxh4>$$Syntax$$</h4><p>%%Syntax%%</p></div>" --><div Class=LanguageSpecific Name=Syntax_VB><h4 class=dxh4>Syntax</h4><p><PRE CLASS="syntax" LANG="VB"><strong>Public Function AddChildItemBinded</strong>( _
&nbsp;&nbsp;&nbsp;<strong>ByVal </strong><i><a class="parameter" id="Type" href="#" onclick="javascript:showParamBox();">Type</a></i></strong> <strong>As</strong> <a href="#Bookmark13302">PropertyItemType</a>, _
&nbsp;&nbsp;&nbsp;<strong>ByVal </strong><i><a class="parameter" id="Handler" href="#" onclick="javascript:showParamBox();">Handler</a></i></strong> <strong>As</strong> <b>Object</b>, _
&nbsp;&nbsp;&nbsp;<strong>ByVal </strong><i><a class="parameter" id="Property" href="#" onclick="javascript:showParamBox();">Property</a></i></strong> <strong>As</strong> <b>String</b> _
)<strong> As <a href="#Bookmark12260">PropertyGridItem</a></strong></PRE></p></div><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="PARAMETERS_LIST" namespace="parameter" source="Item" filter="" format="<h4 class=dxh4>$$ParameterList$$</h4>%%filtereditemlist%%" --><h4 class=dxh4>Parameters</h4><DL>
<DT><I>Type</I></DT>
<DD><TABLE CLASS="FilteredItemListTable" CellSpacing="0"><TR VALIGN="top"><TH>Value</TH><TH>Description</TH></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemString</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>String</STRONG>.</TD> </TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemNumber</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Number</STRONG>. </TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemBool</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Boolean</STRONG>. </TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemColor</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Color</STRONG>.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemFont</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> of type <A href="#Bookmark12521">PropertyGridItemFont</A>. </TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemDouble</strong></TD><TD CLASS="DescriptionCell">Specifies a&nbsp;<A href="#Bookmark12260">PropertyGridItem</A> of type <STRONG>Double</STRONG>.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemDate</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <A href="#Bookmark12420">PropertyGridItemDate</A>.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemPicture</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Picture</STRONG>.</TD></TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemEnum</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>Enum</STRONG>.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemEnumFlags</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <STRONG>EnumFlags</STRONG>.&nbsp; This will create a Flags value item in&nbsp;the Property Grid control.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemCategory</strong></TD><TD CLASS="DescriptionCell">Specifies&nbsp;the <A href="#Bookmark12260">PropertyGridItem</A> is a <A href="#Bookmark12150">Category</A>.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemMultilineString</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A> that contains a multi line string.&nbsp; When using this property a dropdown button will appear next to the item text that when clicked will display a edit window with the entire line of text.</TD></TR>
<TR><TD CLASS="MemberNameCell"><strong>PropertyItemOption</strong></TD><TD CLASS="DescriptionCell">Specifies a <A href="#Bookmark12260">PropertyGridItem</A>&nbsp;of type <A href="#Bookmark12587">PropertyGridItemOption</A>.</TD></TR>
</TABLE><p>The type of the&nbsp;PropertyGridItem.</p></DD>
<DT><I>Handler</I></DT>
<DD><p>The object that "handles" the variable the item is binding to.&nbsp; I.e. The object the variable is defined in.</p></DD>
<DT><I>Property</I></DT>
<DD><p>The name of the variable&nbsp;that will be bound to the PropertyGridItem in string notation (explained below)</p></DD>
</DL><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##RETURNS" format="<h4 class=dxh4>$$Return_Type$$</h4><p>%%comment%%</p>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##REMARKS" format="<h4 class=dxh4>$$Remarks$$</h4><p>%%comment%%</p>" --><h4 class=dxh4>Remarks</h4><p><P>Bound variables store the values of the property grid items and can be accessed without using the property grid methods and properties.&nbsp;&nbsp;Bound&nbsp;variables allow the property grid to store data in variables.&nbsp; Binding works in only one direction. When the value of a PropertyGridItem is changed, the value of the bound variable will be changed to the PropertyGridItem value.&nbsp; If the value of the variable is changed without using the PropertyGrid, the PropertyGridItem value will not change (You would need to explicitly update the PropertGridItem value with the contents of the variable.)&nbsp; The advantage of binding is that&nbsp;the variable can be used and manipulated without using PropertyGridItem methods and properties.&nbsp; </P>
<P></P>
<P>Important Note:&nbsp; When the binding occurs, the variable name is passed to the method in String Notation.&nbsp; String Notation means the name of the variable is placed in quotation marks, within the quotation marks the variable name can be passed with any combination of spaces and uppercase/lowercase letters, but no extra characters can be added and they must appear in the same order.&nbsp; For example, when binding to the variable AssembleName you could pass the variable as Sassemblename⬝&nbsp; which is the same as SASSEMBLE n a m e⬝, but SAssemble Names⬝ will not work because an extra Ss⬝ is added.&nbsp; The reason for this is the variable name passed in String Notation will be used as the PropertyGridItem&nbsp;<A href="#Bookmark12278">Caption</A> if no caption is explicitly set.</P>
<P>
<P>Note:&nbsp; A variable must be declared within an objects code if it will be bound.&nbsp; This means bound variables cannot be declared in a .bas module.</P></p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="sourcecode" format="<h4 class=dxh4>$$Source_Code$$</h4><table border=0 cellpadding=0 cellspacing=0 class=sourcecode><tr><td nowrap>%%sourcecode%%</td></tr></table>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="TaggedComment" source="Item" id="##EXAMPLEINTRO" format="<h4 class=dxh4>$$Example$$</h4><p>%%comment%%</p>" --><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="INLINE_EXAMPLE" namespace="Example" source="Item" filter="type=inline" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4>,format= %%%%filtereditemlist%%" --><h4 class=dxh4>Example</h4><DIV Class=LanguageSpecific Name=Example_VB><p><SPAN class="lang">[AddChildItemBinded Sample (Visual Basic)]</SPAN>&nbsp;This sample illustrates how to use the AddChildItemBinded method to bind PropertyGridItems to variables.</p><DIV Class=LanguageSpecific Name=Code_VB><TABLE Class="CodeContainerTable" CellPadding="0" CellSpacing="0" Border="0"><TR><TD NOWRAP><CODE Class="VB">&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> Category <font class='keyword'>As</font> PropertyGridItem, ItemAssemble <font class='keyword'>As</font> PropertyGridItem<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Dim</font> AssembleName <font class='keyword'>As</font> <font class='keyword'>String</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Variable that the PropertyGridITem will be bound to</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;AssembleName = <font class='string'>&quot;WindowsApplication1&quot;</font><BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Category named "Application" is added to the collection of categories of the first property grid</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> Category = wndPropertyGrid(0).AddCategory(<font class='string'>&quot;Application&quot;</font>)<BR/>
<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Adds a child property item bound to the variable AssembleName.  This child is added to</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'the "Application" category's collection of childs</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='keyword'>Set</font> ItemAssemble = Category.AddChildItemBinded(PropertyItemString, <font class='keyword'>Me</font>, <font class='string'>&quot;AssembleName&quot;</font>)<BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'Change the caption of the property item or the default will be used, the default caption</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;<font class='comment'>'that will be used is the name of the bound variable</font><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;ItemAssemble.Caption = <font class='string'>&quot;Name of Application&quot;</font></CODE></TD></TR></TABLE></DIV></DIV>
<!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="seealso" source="Item" filter="" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$See_Also$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>See Also</h4><p id=dxseealsocontent><a href="#Bookmark12308">PropertyGridItemBool Object</a>
&nbsp;|&nbsp;<a href="#Bookmark12260">PropertyGridItem Object</a>
&nbsp;|&nbsp;<a href="#Bookmark12264">AddChildItem Method</a>
&nbsp;|&nbsp;<a href="#Bookmark12271">InsertChildItem Method</a>
</p><!--DXMETADATA end --> 
            <!--DXMETADATA start type="FilteredItemList" scrap="MENU_LINK" namespace="example" source="Item" filter="type=linked" NoHeader="True" NoFooter="True" format="<h4 class=dxh4>$$Example$$</h4><p id=dxseealsocontent>%%filtereditemlist%%</p>" --><h4 class=dxh4>Example</h4><p id=dxseealsocontent><a href="#Bookmark12260">The InsertChildItem method is used to insert a new PropertyGridItem at a specific position within a collection of items.</a>
</p><!--DXMETADATA end --><!--DXMETADATA start type="Variable" name="CopyrightNotice" format="><!--DXMETADATA end --></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2018. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>

